<script type="text/javascript">

function send(id){
	var str = '';
	$("input[name*='selected']:checked").each(function(){
    	str += $(this).val()+",";
    });
    if(str.length>0){
		$.getJSON("__URL__/SendSms2",{mobile:str,id:id},function(data){
			if(data.success == 1){
				alert("已经重新发送");
				window.location.reload();
			}else{
				alert("发送失败,请稍后重试");
			}
		});
    }else{
    	alert("请先选择欲重新发送短信的电话号码");
    }
	
}

</script>
<div class="data-list">
     <table class="list">
       <thead>
         <tr style="background-color: rgb(244, 244, 248);">
         	<td width="1" style="text-align: center;">
         	  <input type="checkbox" onclick="$('input[name*=\\\'selected\\\']').attr('checked', this.checked);">
         	</td>
           <td class="left">手机号</td>
           <td class="left">发送状态</td>
         </tr>
       </thead>
       <tbody>
       
       <volist name="list" id="val">
         <tr>
           <td style="text-align: center;">
             <if condition="$val['status'] neq '发送成功'"><input type="checkbox" value="{$val.mobile}" name="selected[]"></if>
           </td>
           <td class="left">{$val['mobile']}</td>
           <td class="left">{$val['status']}</td>
         </tr>
       </volist>
       </tbody>
     </table>
     <a class="button" onclick="send('{$_GET[id]}');"><span>重新发送</span>
</div>
